Various types of stimulators have been developed for a variety of in-vivo applications. For example, a stimulator can be employed for performing spinal cord stimulation, deep-brain stimulation or for stimulation of other neurological paths, such as for treatment of various disorders and diseases. Typically, each stimulator includes a waveform generator that generates its own waveform. For instance, a user defines the necessary parameters and the stimulator constructs the waveform accordingly. Usually the parameters include amplitude, frequency, phase symmetry and duty cycle. The more complex the waveform, the more parameters are necessary to describe the waveform. Implantable stimulators are constrained by space and typically cannot accommodate complex circuitry. Implantable stimulators, therefore, usually trade off waveform complexity for saving space. Thus, there is a need for alternate designs for a stimulator capable of generating waveforms to be used in neuromodulation.